//
//  NYUserFindPwdForm.m
//  NYTYY
//
//  Created by MinLison on 2017/12/12.
//  Copyright © 2017年 NYtyy. All rights reserved.
//

#import "NYUserFindPwdForm.h"
#import "NYUserFormButtonCell.h"
#import "NYUserAgreementCell.h"
#import "NYUserFormPhoneCell.h"
#import "NYUserFormSMSCell.h"
#import "NYUserRegisterSubmitCell.h"
#import "NYUserPwdCell.h"
#import "NYUserFormUserRegisterCell.h"
#import "NYUserFindPwdSubmitCell.h"
@implementation NYUserFindPwdForm

- (NSArray *)fields
{
        return @[
                 @{FXFormFieldKey : @keypath(self,mobile), FXFormFieldTitle : @"", FXFormFieldCell : [NYUserFormPhoneCell class], FXFormFieldPlaceholder : @"请输入手机号码"},
                 @{FXFormFieldKey : @keypath(self,sms_code), FXFormFieldTitle : @"", FXFormFieldCell : [NYUserFormSMSCell class], FXFormFieldPlaceholder : @"请输入验证码",FXFormFieldAction: @"getSmsCode"},
                 @{FXFormFieldKey : @keypath(self,password), FXFormFieldTitle : @"", FXFormFieldCell : [NYUserPwdCell class], FXFormFieldPlaceholder : @"请输入密码"},
                 ];
}
- (void)setMobile:(NSString *)mobile
{
        _mobile = mobile;
        NYUserManager.mobile = mobile;
}
- (void)setSms_code:(NSString *)sms_code
{
        _sms_code = sms_code;
        NYUserManager.sms_code = sms_code;
}
- (void)setPassword:(NSString *)password
{
        _password = password;
        NYUserManager.password = password;
}
- (NSArray *)extraFields
{
        return @[
                 @{FXFormFieldTitle : @"重置密码", FXFormFieldCell : [NYUserFindPwdSubmitCell class], FXFormFieldAction: @"resetPassword"}
                 ];
}

- (void)dealloc
{
        NYUserManager.repeat_password = nil;
}
@end
